package cn.com.woxitech.dev.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.woxitech.dev.dao.gen.WmOrganizationPrivilegeMapper;
import cn.com.woxitech.dev.model.gen.WmOrganizationPrivilege;
import cn.com.woxitech.dev.model.gen.WmOrganizationPrivilegeExample;

@Service
public class OrganizationPrivilegeService {
	@Autowired
	WmOrganizationPrivilegeMapper organizationPrivilegeMapper;
	
	public List<WmOrganizationPrivilege> getOrganizationPrivilegeByUserUuid(String userUuid) {
		WmOrganizationPrivilegeExample example = new WmOrganizationPrivilegeExample();
		example.createCriteria().andUseruuidEqualTo(userUuid);
		List<WmOrganizationPrivilege> list = organizationPrivilegeMapper.selectByExample(example);
		return list;
	}
	
	public void insertOrganizationPrivilege(WmOrganizationPrivilege organizationPrivilege) {
		organizationPrivilegeMapper.insertSelective(organizationPrivilege);
	}
}
